﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace DataAccessLayer
{
    public class DataAccessLayer
    {
        String connectionString;

        public DataAccessLayer(String ConnectionString)
        {
            connectionString = ConnectionString;
        }

        public DataTable getAllCustomers()
        {
            DataSet dataSet = new DataSet();

           
                using (SqlConnection conn = new SqlConnection(connectionString))
                {
                    conn.Open();
                    SqlDataAdapter adapter = new SqlDataAdapter("Select * From tblClients", conn);

                    adapter.Fill(dataSet);
                    return dataSet.Tables[0];
                }
         }
         
    }
}
